<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>后台管理</title>
<link rel="stylesheet" rev="stylesheet"
	href="__PUBLIC__/admin/css/style.css" type="text/css" media="all" />
<script type="text/javascript" src="http://api.map.baidu.com/api?v=1.3"></script>

<script language="JavaScript" type="text/javascript">
function tishi()
{
  var a=confirm('��ݿ��б����и���Ա����Ϣ��������޸Ļ�������Ϣ��');
  if(a!=true)return false;
  window.open("��ͻҳ.htm","","depended=0,alwaysRaised=1,width=800,height=400,location=0,menubar=0,resizable=0,scrollbars=0,status=0,toolbar=0");
}

function check()
{
document.getElementById("aa").style.display="";
}


function link(){
alert('����ɹ���');
    document.getElementById("fom").action="xuqiumingxi.htm";
   document.getElementById("fom").submit();
}
function test(){
	alert("__ACTION__");
}



</script>
<style type="text/css">
<!--
.atten {
	font-size: 12px;
	font-weight: normal;
	color: #F00;
}
-->
</style>
</head>

<body class="ContentBody">
	<form method="post" action="__APP__/Admin/doAddNode">
		<div class="MainDiv">
			<table width="99%" border="0" cellpadding="0" cellspacing="0"
				class="CContent">
				<tr>
					<th class="tablestyle_title"><eq name="type" value="edit">编辑线路节点<else />添加线路节点</eq>
					</th>
				</tr>
				<tr>
					<td class="CPanel">
						<table border="0" cellpadding="0" cellspacing="0"
							style="width: 100%">
							<tr>
								<td width="100%" align="left">
									<fieldset style="height: 100%;">
										<legend>节点信息</legend>
										<table border="0" cellpadding="2" cellspacing="1"
											style="width: 100%">
											<tr>
												<td nowrap align="right" width="13%">节点名字：</td>
												<td width="41%"><input name="nodeName" class="text"
													style="width: 250px" type="text" size="40"
													value="{$node[0]['name']}" /> <span class="red"> *</span></td>
												<td align="right" width="19%">经度：</td>
												<td width="27%"><input name="longitude" id="longitude"
													class="text" style="width: 154px"
													value="{$node[0]['longitude']}" /> <span class="red">*</span></td>
											</tr>
											<tr>
												<td nowrap align="right">所属管线：</td>
												<td><select name="lineID">
														<volist name="line" id="vo"> <eq name="line_id"
															value="$vo.line_id">
														<option selected value="{$vo.line_id}">{$vo.line_name}</option>
														<else />
														<option value="{$vo.line_id}">{$vo.line_name}</option>
														</eq> </volist>

												</select></td>
												<td align="right">纬度：</td>
												<td><input name="latitude" id="latitude" class="text"
													style="width: 154px" value="{$node[0]['latitude']}" /> <span
													class="red">*</span> <input type="button" value="检测位置"
													onclick="checkLocation()" /></td>

											</tr>
											<tr>
												<td colspan="3" align="right" nowrap>在线路中的位置编号： <input
													name="order_id" id="input" class="text"
													style="width: 154px" value="{$node[0]['order_id']}" /></td>
												<td align="right" nowrap>&nbsp;</td>
											</tr>
										</table>
										<br />
									</fieldset>
								</td>
							</tr>

						</TABLE>


					</td>
				</tr>
				<TR>
					<TD colspan="2" align="center" height="50px"><input
						type="submit" name="Submit" value="提交" class="button" /> <input
						type="reset" name="Submit2" value="重填" class="button" /></TD>
				</TR>
			</TABLE>


			</td>
			</tr>

			</table>

		</div>
	</form>
	<div id="maps"
		style="width: 520px; height: 340px; border: 1px solid gray">
	</div>
</body>
</html>


<script type="text/javascript">
var map = new BMap.Map("maps",{mapType:BMAP_HYBRID_MAP});

//检测经纬度数据是否合法
function checkLocation(){
	var longitude = document.getElementById("longitude").value;
	var latitude = document.getElementById("latitude").value;
	map.clearOverlays();
	map.centerAndZoom(new BMap.Point(longitude,latitude), 18);
	var marker = new BMap.Marker(new BMap.Point(longitude, latitude));  // 创建标注
	map.addOverlay(marker);              // 将标注添加到地图中
}
</script>
